ABOUT THE PROCESS RUNNER SYSTEM
--------------------------------

This system will launch any number of scripted processes, each on their own unique schedule of your choosing. The code is written using only "vanilla" AS and has no dependencies other than System Events, Standard Additions, and a handful of shell commands. The system is robust and has been in continuous operation for years, running on a Mac Mini used as a "drone". We reboot the computer about once a week to maintain system stability.

Here's how it works: first, a process folder is set up that contains the following files:

Process_Runner.app			The controlling script using an idle loop, saved as a stay-open application
Sample_Process_1.scpt		A process script file to execute
Sample_Process_1.plist		A property list that holds the script's "Run Parameters" and execution history

Note that each process consists of a pair of files: a compiled script file and a property list file. There may be any number of processes present, or none at all. The brains of the system, the script "Process_Runner.app", will dynamically detect them and deploy any found processes according to each one's unique schedule. Processes may be added or removed any time the main script is stopped.

Processes can be triggered by one or more of the following "Run Parameters". These parameters are compared against the current day and time, and the history of prior executions of the process, to determine whether or not to run the process. This is rechecked 30 seconds (or at whatever delay you desire) after any triggered processes complete their runs. Launch times are approximate, depending on the number of processes and how long they each take to complete.

	dailyStartTime  (Earliest time of day to execute the process script)
	 9:00 AM   = Start at 9:00 AM
	12:01 AM   = Start at midnight

	dailyEndTime  (Latest time of day to run)
	 9:00 PM   = End at 9:00 PM
 	11:59 PM   = End at midnight

	minsDelayBetweenRuns     (Delay between executions)
	60   = Run once per hour
	 0   = No delay between runs; run as often as possible

	numRunsPerDay  (Limit of daily executions)
	4   = Run process 4 times per day
	0   = No limit on daily runs; run as many times as possible

	weekdaysToRun  (Days of week to execute)
	SuMoTuWeThFrSa   = Run every day of the week
	Sa               = Run only on Saturdays
	MoWeFr           = Run only on Mondays, Wednesdays, and Fridays

As an example, to run a script every weekday (not weekends) at noon, you'd use the following "Run Parameters":
	
	dailyStartTime*			12:00 PM		Begin checking Run Parameters at this time
	dailyEndTime*			12:30 PM		Stop checking Run Parameters at this time
	minsDelayBetweenRuns	0				Don't specify a delay between runs
	numRunsPerDay			1				Execute only once per day
	weekdaysToRun			MoTuWeThFr		Execute only on these days of the week

Or another example, to run a script every 4 hours every day, but not more than 4 times, you'd use the following "Run Parameters":
	
	dailyStartTime*			6:00 AM			Begin checking Run Parameters at this time
	dailyEndTime*			7:00 PM			Stop checking Run Parameters at this time
	minsDelayBetweenRuns	240				Four hour delay between runs
	numRunsPerDay			4				Execute 4 times per day
	weekdaysToRun			SuMoTuWeThFrSa	Execute every day
______
*If another long-running process may encroach on these start or end times, make 'dailyEndTime' later to allow for it.
